2025-05-27-12-16
Implementing Agents in JavaScript
Abstract
arXiv:2505.18228v1 Announce Type: new Abstract: This chapter gives an introduction to agent-oriented programming in JavaScript. It provides an example-based walk-through of how to implement abstractions for reasoning loop agents in vanilla JavaScript. The initial example is used as a stepping stone for explaining how to implement slightly more advanced agents and multi-agent systems using JS-son, a JavaScript library for agent-oriented programming. In this context, the chapter also explains how to integrate reasoning loop agents with generative AI technologies--specifically, large language models. Finally, application scenarios in several technology ecosystems and future research directions are sketched.
摘要
本章介绍了JavaScript中的面向智能体编程方法。通过示例演示了如何在原生JavaScript中实现推理循环智能体的抽象概念。初始示例作为基础,进一步阐释了如何运用JS-son(一个面向智能体编程的JavaScript库)来实现更高级的智能体与多智能体系统。在此背景下,本章还探讨了如何将推理循环智能体与生成式人工智能技术——特别是大语言模型——进行整合。最后,概述了该技术在多个技术生态系统中的应用场景及未来研究方向。
An Outlook on the Opportunities and Challenges of Multi-Agent AI Systems
Abstract
arXiv:2505.18397v1 Announce Type: new Abstract: Multi-agent AI systems (MAS) offer a promising framework for distributed intelligence, enabling collaborative reasoning, planning, and decision-making across autonomous agents. This paper provides a systematic outlook on the current opportunities and challenges of MAS, drawing insights from recent advances in large language models (LLMs), federated optimization, and human-AI interaction. We formalize key concepts including agent topology, coordination protocols, and shared objectives, and identify major risks such as dependency, misalignment, and vulnerabilities arising from training data overlap. Through a biologically inspired simulation and comprehensive theoretical framing, we highlight critical pathways for developing robust, scalable, and secure MAS in real-world settings.
摘要
多智能体人工智能系统(MAS)为分布式智能提供了一个前景广阔的框架,能够实现自主智能体间的协同推理、规划与决策。本文基于大语言模型(LLMs)、联邦优化和人机交互领域的最新进展,系统性地阐述了当前MAS面临的机遇与挑战。我们形式化定义了智能体拓扑结构、协调协议和共享目标等关键概念,并识别出训练数据重叠导致的依赖性、目标偏差和系统脆弱性等主要风险。通过仿生学模拟实验和综合理论框架,我们重点探讨了在现实场景中开发鲁棒、可扩展且安全的MAS的关键路径。
Pedagogy-R1: Pedagogically-Aligned Reasoning Model with Balanced Educational Benchmark
Abstract
arXiv:2505.18467v1 Announce Type: new Abstract: Recent advances in large reasoning models (LRMs) show strong performance in structured domains such as mathematics and programming; however, they often lack pedagogical coherence and realistic teaching behaviors. To bridge this gap, we introduce Pedagogy-R1, a framework that adapts LRMs for classroom use through three innovations: (1) a distillation-based pipeline that filters and refines model outputs for instruction-tuning, (2) the Well-balanced Educational Benchmark (WBEB), which evaluates performance across subject knowledge, pedagogical knowledge, tracing, essay scoring, and teacher decision-making, and (3) a Chain-of-Pedagogy (CoP) prompting strategy for generating and eliciting teacher-style reasoning. Our mixed-method evaluation combines quantitative metrics with qualitative analysis, providing the first systematic assessment of LRMs' pedagogical strengths and limitations.
摘要
大规模推理模型(LRMs)近期在数学和编程等结构化领域展现出卓越性能,但其往往缺乏教学连贯性与真实教学行为。为弥合这一差距,我们提出Pedagogy-R1框架,通过三项创新实现LRMs的课堂适配:(1)基于蒸馏的流程,对模型输出进行教学调优的筛选与精炼;(2)均衡教育基准(WBEB),从学科知识、教学法知识、学习轨迹追踪、论文评分及教师决策五个维度评估性能;(3)教学链(CoP)提示策略,用于生成和引导教师风格推理。我们采用混合方法评估,结合量化指标与质性分析,首次系统评估了LRMs的教学优势与局限。
Understanding and Mitigating Overrefusal in LLMs from an Unveiling Perspective of Safety Decision Boundary
Abstract
arXiv:2505.18325v1 Announce Type: new Abstract: Large language models (LLMs) have demonstrated remarkable capabilities across a wide range of tasks, yet they often refuse to answer legitimate queries-a phenomenon known as overrefusal. Overrefusal typically stems from over-conservative safety alignment, causing models to treat many reasonable prompts as potentially risky. To systematically understand this issue, we probe and leverage the models'safety decision boundaries to analyze and mitigate overrefusal. Our findings reveal that overrefusal is closely tied to misalignment at these boundary regions, where models struggle to distinguish subtle differences between benign and harmful content. Building on these insights, we present RASS, an automated framework for prompt generation and selection that strategically targets overrefusal prompts near the safety boundary. By harnessing steering vectors in the representation space, RASS efficiently identifies and curates boundary-aligned prompts, enabling more effective and targeted mitigation of overrefusal. This approach not only provides a more precise and interpretable view of model safety decisions but also seamlessly extends to multilingual scenarios.We have explored the safety decision boundaries of various LLMs and construct the MORBench evaluation set to facilitate robust assessment of model safety and helpfulness across multiple languages. Code and datasets will be released at https://anonymous.4open.science/r/RASS-80D3.
摘要
大语言模型(LLMs)在广泛的任务中展现出卓越能力,却经常拒绝回答合理查询——这种现象称为过度拒绝。过度拒绝通常源于过度保守的安全对齐机制,导致模型将许多合理提示视为潜在风险。为系统研究该问题,我们通过探测并利用模型的安全决策边界来分析及缓解过度拒绝。研究发现,过度拒绝与边界区域的错位密切相关,这些区域中模型难以区分良性内容与有害内容的细微差异。基于此,我们提出RASS框架——一种针对安全边界附近过度拒绝提示的自动化生成与选择策略。通过利用表征空间的导向向量,RASS高效识别并筛选边界对齐提示,实现更精准定向的过度拒绝缓解。该方法不仅为模型安全决策提供了更精确可解释的视角,还能无缝扩展至多语言场景。我们探索了多种LLMs的安全决策边界,并构建MORBench评估集以促进跨语言模型安全性与实用性的稳健评估。代码与数据集将在https://anonymous.4open.science/r/RASS-80D3发布。
Persona Alchemy: Designing, Evaluating, and Implementing Psychologically-Grounded LLM Agents for Diverse Stakeholder Representation
Abstract
arXiv:2505.18351v1 Announce Type: new Abstract: Despite advances in designing personas for Large Language Models (LLM), challenges remain in aligning them with human cognitive processes and representing diverse stakeholder perspectives. We introduce a Social Cognitive Theory (SCT) agent design framework for designing, evaluating, and implementing psychologically grounded LLMs with consistent behavior. Our framework operationalizes SCT through four personal factors (cognitive, motivational, biological, and affective) for designing, six quantifiable constructs for evaluating, and a graph database-backed architecture for implementing stakeholder personas. Experiments tested agents' responses to contradicting information of varying reliability. In the highly polarized renewable energy transition discourse, we design five diverse agents with distinct ideologies, roles, and stakes to examine stakeholder representation. The evaluation of these agents in contradictory scenarios occurs through comprehensive processes that implement the SCT. Results show consistent response patterns ( range: ) and systematic temporal development of SCT construct effects. Principal component analysis identifies two dimensions explaining % of variance, validating the theoretical structure. Our framework offers improved explainability and reproducibility compared to black-box approaches. This work contributes to ongoing efforts to improve diverse stakeholder representation while maintaining psychological consistency in LLM personas.
摘要
尽管在设计大型语言模型(LLM)角色方面取得了进展,但在使其与人类认知过程保持一致及呈现多元利益相关者视角方面仍存在挑战。我们提出一种基于社会认知理论(SCT)的智能体设计框架,用于设计、评估和实现具有行为一致性的心理学基础LLM。该框架通过四大个人因素(认知、动机、生物和情感)进行设计,六个可量化构念进行评估,并采用图数据库支撑的架构来实现利益相关者角色建模。实验测试了智能体对不同可靠性矛盾信息的响应。在高度两极化的可再生能源转型讨论中,我们设计了五个具有不同意识形态、角色和利益诉求的多样化智能体,以检验利益相关者表征效果。通过实施SCT的综合流程,对这些智能体在矛盾情境中的表现进行评估。结果显示出一致的响应模式(R²范围:0.58-0.61)以及SCT构念效应的系统性时序发展。主成分分析识别出两个解释73%方差的维度,验证了理论结构。相较于黑箱方法,本框架提供了更好的可解释性和可复现性。这项工作为在保持LLM角色心理一致性的同时提升多元利益相关者表征能力的研究做出了贡献。
Single-agent or Multi-agent Systems? Why Not Both?
Abstract
arXiv:2505.18286v1 Announce Type: new Abstract: Multi-agent systems (MAS) decompose complex tasks and delegate subtasks to different large language model (LLM) agents and tools. Prior studies have reported the superior accuracy performance of MAS across diverse domains, enabled by long-horizon context tracking and error correction through role-specific agents. However, the design and deployment of MAS incur higher complexity and runtime cost compared to single-agent systems (SAS). Meanwhile, frontier LLMs, such as OpenAI-o3 and Gemini-2.5-Pro, have rapidly advanced in long-context reasoning, memory retention, and tool usage, mitigating many limitations that originally motivated MAS designs. In this paper, we conduct an extensive empirical study comparing MAS and SAS across various popular agentic applications. We find that the benefits of MAS over SAS diminish as LLM capabilities improve, and we propose efficient mechanisms to pinpoint the error-prone agent in MAS. Furthermore, the performance discrepancy between MAS and SAS motivates our design of a hybrid agentic paradigm, request cascading between MAS and SAS, to improve both efficiency and capability. Our design improves accuracy by 1.1-12% while reducing deployment costs by up to 20% across various agentic applications.
摘要
多智能体系统(MAS)通过将复杂任务分解并分配给不同的大语言模型(LLM)智能体与工具来实现任务处理。先前研究表明,得益于角色专属智能体的长程上下文追踪与错误修正能力,MAS在多个领域展现出卓越的准确性。然而相较于单智能体系统(SAS),MAS的设计与部署具有更高的复杂性和运行时成本。与此同时,前沿LLM(如OpenAI-o3和Gemini-2.5-Pro)在长上下文推理、记忆保持和工具使用方面快速进步,消解了许多最初促使MAS设计的局限性。本文通过大量实证研究对比了MAS与SAS在各类主流智能体应用中的表现,发现随着LLM能力的提升,MAS相对于SAS的优势逐渐减弱,并提出高效机制以定位MAS中易出错的智能体。此外,MAS与SAS的性能差异促使我们设计出一种混合智能体范式——在MAS与SAS之间进行请求级联,以同步提升效率与能力。该设计在各类智能体应用中实现1.1-12%的准确率提升,同时降低最高达20%的部署成本。